#!/bin/sh

DIRECT_DNS_SERVER_SERVICE="[[direct.dns.server.service]]"
JAMES3_SERVICE="[[james3.service]]"

update-rc.d \
	"$DIRECT_DNS_SERVER_SERVICE" \
	"remove"

update-rc.d \
	"$JAMES3_SERVICE" \
	"remove"

[ ! -e "/var/lib/direct" ] || \
	\
	tar \
		-c \
		-C "/var/lib" \
		-f "/var/lib/direct_backup_$(date '+%F_%H%M%S_%Z').tar.gz" \
		-z \
		"direct"
